<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>即时通讯开放平台</title>
<link rel="stylesheet" type="text/css" href="css/open.css">
<link rel="stylesheet" type="text/css" href="../common/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="css/miniGame.css">
<link rel="stylesheet" type="text/css" href="css/fileUpload.css">
</head>
<style type="text/css">
	*{
		margin: 0;
		padding: 0;
		line-height: 1.6;
	}
	body{
		border: 0;
		padding: 0;
		margin: 0
	}
</style>
<body>
<div class="inner_wrp">
	<ul class="layui-nav" lay-filter="happy" style="height: 46px;line-height: 46px;background-color: white">
		<li class="layui-nav-item" type="1" style="line-height: 46px;height: 26px;" onclick=""><a href="/pages/open/mobileApp.html" style="color: #c5c5c5">移动应用</a></li>
		<li class="layui-nav-item" type="2" style="line-height: 46px;height: 26px;"><a href="/pages/open/webApp.html" style="color: #c5c5c5">网站应用</a></li>
		<li class="layui-nav-item" type="4" style="line-height: 46px;height: 26px;"><a href="/pages/open/miniGame.html" style="color: #c5c5c5">小游戏</a><p style="width: 65px;margin-left: 15px;height: 2px;background-color: #3EB94E"></p></li>
	</ul>
</div>
<div id="mobileApp" class="layui-container" style="min-height: 630px;margin-top: 10px;">
	<!-- 小游戏列表 -->
	<div id="minigameList" class="appList-item">
		<button class="layui-btn layui-btn-normal" onclick="MiniGameOperation.showMiniGameFrom()">创建小游戏</button>
		<table id="minigame_list_tab" class="layui-table" lay-filter="minigame_list"></table>
	</div>

	<!-- app详情 -->
	<div id="WebAppItem" style="display: none;">
		<div style="padding-top: 18px;color: #222">
			<a href="" style="color: #222;text-decoration: none;outline: 0;">管理中心</a>
			<span>/</span>
			应用详情
		</div>
		<div style="padding-bottom: 30px;border: 1px solid #e6e6e6;background-color: #fff;margin-top: 44px;min-height: 630px;">
			<div style="position: relative;">
				<div style="overflow: hidden;margin: -1px;">
					<div style="content: '\200B';display: block;clear: both;padding: 32px 32px;">
						<div style="float: left;margin-right: 1em;height: 110px;">
							<img id="app_url" src="" style="width: 110px;height: 110px;">
						</div>
						<div style="margin-left: 124px;position: relative;min-height: 110px;">
							<p id="app_name" style="font-size: 16px;margin: 0;"></p>
							<p style="color: #9e9f9f;line-height: 25px;margin: 0;"><strong>AppID:</strong><span id="app_id">wx373339ef4f3cd807</span></p>
							<p style="color: #9e9f9f;line-height: 25px;margin: 0;"><strong>AppSecret：</strong>
								<span id="AppSecret"></span>
							</p>
							<div style="margin-top: 10px;color: #7fba4f;">
								<i></i>
								<span id="app_status"></span>
							</div>
							<div style="position: absolute;top: 0;width: 100%;text-align: right;">
								<div id="app_delete" style="text-align: right;">

								</div>
							</div>
						</div>
					</div>
				</div>
				<div id="interfaceInfo">
					<div style="border: 0;">
						<h3 style="padding: 0 32px;background-color: #ebebeb;line-height: 44px;">接口信息</h3>
						<div>
							<table class="layui-table" style="margin: 0">
								<thead>
								<tr>
									<th style="border-left-color: #dfdfdf;border-bottom-color: #dfdfdf;padding-top: 0;padding-bottom: 0;line-height: 46px;border-width: 0;border-left-width: 0;">接口名称</th>
									<th style="border-left-color: #dfdfdf;border-bottom-color: #dfdfdf;padding-top: 0;padding-bottom: 0;line-height: 46px;border-width: 0;border-left-width: 0;">接口介绍</th>
									<th style="border-left-color: #dfdfdf;border-bottom-color: #dfdfdf;padding-top: 0;padding-bottom: 0;line-height: 46px;border-width: 0;border-left-width: 0;">接口状态</th>
									<th style="border-left-color: #dfdfdf;border-bottom-color: #dfdfdf;padding-top: 0;padding-bottom: 0;line-height: 46px;border-width: 0;border-left-width: 0;">操作</th>
								</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 创建app -->
	<div id="createMiniGame_div" style="display: none;">
			<h3>创建小游戏</h3>
			<div class="createMiniGame">
				<form class="layui-form">

					<div class="layui-form-item">
						<label class="layui-form-label">游戏应用名称</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入游戏名称" autocomplete="off" class="layui-input appName" style="width: 85%;" onkeyup="MiniGameOperation.widthCheck(this,20);">
							<p class="input_p">游戏名称需在2到20个字节之间，一个中文占两个字节，半年只能修改1次</p>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">应用简介</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入首页地址" autocomplete="off" class="layui-input appIntroduction" style="width: 85%;" onkeyup="MiniGameOperation.widthCheck(this,80);">
							<div class="input_p">最多80字</div>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">游戏应用地址</label>
						<div class="layui-input-block">
							<input type="text" placeholder="请输入首页地址" autocomplete="off" class="layui-input appUrl" style="width: 85%;">
							<div class="input_p">请填写小游戏网站地址</div>
						</div>
					</div>

<!--					<div class="layui-col-md12" style="margin-top: 5%;">
						<div style="content: '\200B';display: block;clear: both;padding-bottom: 15px;word-break: normal;">
							<label class="layui-form-label">程序源文件</label>
							<div style="clear: both;height: 0 !important;display: block;line-height: 0;padding-top: 2px;display: table-cell;vertical-align: top;float: none;width: auto;">
								<div style="width: 510px;margin-bottom: 40px;">
									<div class="photo_div">
										<p class="photo_p">上传小游戏主程序源文件</p>
										<span class="file_span">
										<a  href="javascript:;" class="layui-btn">选择文件</a>
										<ul class="file_ul"></ul>
										<div class="file_div">
											<label onclick="MiniGameOperation.selectUploadFilePath('uploadSmall_url_source')" class="file_label"></label>
										</div>
									</span>
										<p id="uploadSmall_url_source" style="width: 35px"></p>
									</div>
								</div>
							</div>
						</div>
					</div>-->

					<div class="layui-col-md12">
						<div style="content: '\200B';display: block;clear: both;padding-bottom: 15px;word-break: normal;">
							<label class="layui-form-label">游戏应用图标</label>
							<div style="clear: both;height: 0 !important;display: block;line-height: 0;padding-top: 2px;display: table-cell;vertical-align: top;float: none;width: auto;">
								<div style="width: 510px;margin-bottom: 40px;">
									<div class="photo_div">
										<p class="photo_p">上传小游戏图标</p>
										<span class="file_span">
										<a  href="javascript:;" class="layui-btn">选择文件</a>
										<ul class="file_ul"></ul>
										<div class="file_div">
											<label onclick="MiniGameOperation.selectSmallFile('uploadSmall_url_loge')" class="file_label"></label>
										</div>
									</span>
										<img id="uploadSmall_url_loge" src="" style="width: 35px">
									</div>
									<div class="layui-progress" style="margin-left: 4px;margin-top: 1px;width: 93px;" lay-filter="uploadSmall_url_loge">
										<div class="layui-progress-bar" lay-percent="0%"></div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>

				<button class="layui-btn layui-btn-lg" style="display:block;margin:0 auto" onclick="MiniGameOperation.miniGameSubmitFrom()">保存</button>
			</div>
		</div>
	</div>

	<!-- 校验 -->
	<form id="showMsgInfo" style="display: none;">
		<div class="layui-form-item">
			<p class="layui-form-label" id="msgTitle" style="width: 500px;text-align: left"></p><br/>
			<div class="layui-input-block" id="msgContent">
				<div class="layui-form-item">
					<label class="layui-form-label">校验账号</label>
					<div class="layui-input-inline">
						<input type="text" id="sub_telephone" placeholder="请输入账号" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">校验密码</label>
					<div class="layui-input-inline">
						<input type="password" id="sub_password" placeholder="请输入密码" autocomplete="off" class="layui-input">
					</div>
				</div>
				<p style="width: 85%;color: red;">创建的应用受到保护，你需要通过即时通讯来证实你对该应用名称的所有权，请填写当前或者相关即时通讯开放平台账号。</p>
			</div>
		</div>
	</form>

	<!--上传图片表单-->
	<form id="uploadSmallFileFrom" name="uploadSmallFileFrom" action="" method="post" enctype="multipart/form-data" style="display: none;">
		<input id="photoSmallUrl" type="hidden" name="photoSmallUrl">
		<input id="photoSmallUpload" lay-filter="photoSmallUpload" onchange="MiniGameOperation.upload()" name="myfile" type="file" style="display: none;" accept="image/bmp,image/png,image/jpeg,image/jpg,image/gif">
	</form>

	<!--上传文件表单-->
	<form id="uploadFilePath_update" name="uploadFilePath_update" action="" method="post" enctype="multipart/form-data" style="display: none;">
		<input id="uploadFilePathUrl_update" type="file" name="file" value="" onchange="MiniGameOperation.updateUpload()" accept="*">
	</form>

	<script type="text/javascript" src="/pages/common/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="/pages/common/layui/layui.all.js"></script>
	<script src="/pages/open/js/jquery.form.js" type="text/javascript"></script>
	<script type="text/javascript" src="/pages/assets/js/jquery.md5.js"></script>
	<script type="text/javascript" src="/pages/open/js/config.js"></script>
	<script type="text/javascript" src="/pages/open/js/webApp.js"></script>
	<script type="text/javascript" src="/pages/open/js/miniGame.js"></script>
</body>
</html>